#ifndef EDGE_PLUGIN_H
#define EDGE_PLUGIN_H

#include "edge_plugin_global.h"
#include "cvplugininterface.h"
#include <QObject>
#include <QSpinBox>

namespace Ui {
    class PluginGui;
}

class EDGE_PLUGINSHARED_EXPORT Edge_Plugin: public QObject, public CvPluginInterface
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "com.opencv.cvplugininterface")
    Q_INTERFACES(CvPluginInterface)
public:
    Edge_Plugin();
    ~Edge_Plugin();

    QString title();
    QString version();
    QString description();
    QString help();
    void setupUi(QWidget *parent);
    void processImage(const cv::Mat &inputImage, cv::Mat &outputImage);
    void init(bool a);

signals:
    void updateNeeded();
    void errorMessage(QString msg);
    void infoMessage(QString msg);

private slots:

    void on_mainTabs_currentChanged(int index);

    void on_derivSobelRadio_toggled(bool checked);

    void on_derivScharrRadio_toggled(bool checked);

    void on_derivLaplacRadio_toggled(bool checked);

    void on_derivScaleSpin_valueChanged(double arg1);

    void on_derivDeltaSpin_valueChanged(double arg1);

    void on_derivKsizeSpin_valueChanged(int arg1);

    void on_cannyThresh1Spin_valueChanged(int arg1);

    void on_cannyThresh2Spin_valueChanged(int arg1);

    void on_spinBox_valueChanged(int arg1);

    void on_cannyKsizeSpin_valueChanged(int arg1);

    void openURL(QString url);

    void on_contourTh1Spin_valueChanged(int arg1);

    void on_contourTh2Spin_valueChanged(int arg1);

    void on_contourModeBox_currentIndexChanged(int index);

    void on_contourMethBox_currentIndexChanged(int index);

private:
    Ui::PluginGui *ui;

};

#endif // EDGE_PLUGIN_H
